import React from 'react'
import PropTypes from 'prop-types'
import { Form, Button, Row, Col, Switch,Input  } from 'antd'
import styles from './List.less'
const Search = Input.Search;

const UserFilter = ({
  field,
  keyword,
  onSearch,
  onAdd,
  isMotion,
  switchIsMotion,
}) => {
  const searchGroupProps = {
    field,
    keyword,
    size: 'large',
    select: true,
    selectOptions: [{ value: 'name', name: '名称' }, { value: 'info', name: '描述' }],
    selectProps: {
      defaultValue: field || 'name',
    },
    onSearch: (value) => {
      onSearch(value)
    },
  }
  const onSearchval = (e) =>{
    console.log("关键字==",e)
  }
  return (
      <div className={styles.filterTop}>
        <div className={styles.title}><span style={{marginRight:20}}>用户</span> <Button type="primary" style={{marginBottom:5}} size="large" onClick={onAdd}  icon="plus">添加用户</Button></div>
        <div className={styles.Searchright}>
        </div>
      </div>
  )
}

UserFilter.propTypes = {
  form: PropTypes.object.isRequired,
  onSearch: PropTypes.func,
  onAdd: PropTypes.func,
  field: PropTypes.string,
  keyword: PropTypes.string,
  isMotion: PropTypes.bool,
  switchIsMotion: PropTypes.func,
}

export default Form.create()(UserFilter)
